Some embodiments of the invention relate to computing systems, and in particular, to space management for objects stored in the computing system.
Modern database systems have been developed to handle many different data types, including non-traditional data types such as images, text, audio, and video data. Such non-traditional data types are often stored as “large objects” (LOBs) in the database system. LOBs may be of any size, but are often much larger than traditional data types. For example, LOBs in some database systems may span anywhere from 1 Kbyte to many Gbytes in size.
Because of their size, LOBs often cannot be efficiently handled with the same techniques used to handle traditional data types. The size of LOBs could result in space management difficulties within the database system. Given this size issue with LOBs, the specific techniques used to handle storage and disk management tasks for LOBs could have a very significant impact upon the performance of the database system, e.g., with respect to system I/O and space utilization.
One possible approach for performing space management for large objects is to divide the available storage space into equal sized pages. The size of the page would be configured at the LOB creation time. Every I/O operation would be bounded by this size limit. The problem with this approach is that LOBs be associated with storage of objects having different sizes, and therefore one value for the page size may not be suitable for all object sizes.
For example, consider if the LOBs are stored with a relatively large page size. The advantage of the larger page size is that large LOBs may see an increase in I/O latency performance proportional to the size of the LOB. However, there are also significant disadvantages since the large page size could cause a significant waste of storage space for smaller LOBs.
Consider if the LOBs are stored with a relatively small page size. The advantage of the smaller page size is that less storage space will be wasted, since smaller LOBs will better fit the page size. However, this approach will more likely result in larger LOBS being split apart to fit into multiple separate pages. This could cause fragmentation and a decrease in I/O latency performance.
Another possible approach is to allow users to manually alter the page size. However, this may present a manageability problem since approach is necessitated by having fairly sophisticated and well-trained users that will have to be aware of and able to adequately adjust additional storage parameters.
Based on the foregoing, it is clearly desirable to provide a method and mechanism to more efficiently management storage for large objects.